package com.demo.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.demo.entity.TOrgTel;
import com.demo.mapper.TOrgTelMapper;
import com.demo.service.ITOrgTelService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

/**
 * <p>
 * insert into t_org_tel
select o.id,o.id,o.orgname,o.telephone,o.district,(select d.code_desc from t_pa_dic d where d.type='district' and d.code=o.district) from t_pa_org o where o.sidetype='2' and o.id not like '%DISTRICT%' and o.id not in (select tel.orgid from t_org_tel tel)
 服务实现类
 * </p>
 *
 * @author author
 * @since 2022-08-04
 */
@Service
public class TOrgTelServiceImpl extends ServiceImpl<TOrgTelMapper, TOrgTel> implements ITOrgTelService {

    @Override
    public IPage<TOrgTel> selectPage(Integer pageNum, Integer pageSize) {
        Page<TOrgTel> page = new Page<>(pageNum , pageSize);
        IPage<TOrgTel> tOrgTelIPage = this.baseMapper.selectPage(page, null);
        return tOrgTelIPage;
    }
}
